import { REGEX_SORT } from '@/utils/validate'

const rules = {
  goodsQualityStar: [
    {
      required: true,
      message: '请给商品质量打分',
      trigger: 'change'
    }
  ],
  content: [
    {
      required: true,
      message: '请输入评价内容',
      trigger: 'blur'
    },
    {
      max: 200,
      message: '评价内容在200字以内',
      trigger: 'blur'
    }
  ],
  logisticsServeStar: [
    {
      required: true,
      message: '请给物流服务打分',
      trigger: 'change'
    }
  ],
  csMannerStar: [
    {
      required: true,
      message: '请给客服态度打分',
      trigger: 'change'
    }
  ],
  sort: [
    {
      required: true,
      message: '请输入评价排序'
    },
    {
      pattern: REGEX_SORT,
      message: '评价排序在（1-9999）之间'
    }
  ]
}

export default rules
